<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos  -->
			<title>Docs For Class Rho_Validator</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
						<script src="../../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../../media/images/plus.png";
				imgMinus.src = "../../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle">Interface Rho_Validator</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Interface that all validator classes must implement.</p>
		<p class="notes">
			Located in <a class="field" href="_rho---Rho_Valid.class.php.html">/rho/Rho_Valid.class.php</a> (line <span class="field">231</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#filter" title="details" class="method-name">filter</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#optional" title="details" class="method-name">optional</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#postFilter" title="details" class="method-name">postFilter</a>
											(<span class="var-type">string|int|float|bool</span>&nbsp;<span class="var-name">&$value</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#preFilter" title="details" class="method-name">preFilter</a>
											(<span class="var-type">string|int|float|bool</span>&nbsp;<span class="var-name">&$value</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#setOptional" title="details" class="method-name">setOptional</a>
											([<span class="var-type">bool</span>&nbsp;<span class="var-name">$optional</span> = <span class="var-default">TRUE</span>])
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">bool|string</span>
										<a href="#valid" title="details" class="method-name">valid</a>
											(<span class="var-type">string|int|float|bool</span>&nbsp;<span class="var-name">&$value</span>)
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodfilter" id="filter"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">filter</span> (line <span class="line-number">263</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Whether the value should be filtered before being validated.</p>
<p class="description"><p>Usually TRUE, so you should use controller-&gt;post() or controller-&gt;get(),  or if the source if not from POST or GET request, Rho::filter(),  for $value BEFORE calling postFilter()</p><p>If this returns FALSE, you should use the raw $_POST/etc. and the validator class  is responsable for filtering in the preFilter() method.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Normally TRUE.</li>
				<li><span class="field">see:</span> <a href="../../Rho/Rho_Controller.html#methodpost">Rho_Controller::post()</a>, <a href="../../Rho/Rho_Controller.html#methodget">Rho_Controller::get()</a>, <a href="../../Rho/Rho.html#methodfilter">Rho::filter()</a></li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			filter
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodoptional" id="optional"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">optional</span> (line <span class="line-number">268</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Whether this validation rule is optional or not.</p>
<p class="description"><p>Defaults to FALSE, indicating the value must be present.</p></p>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			optional
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodpostFilter" id="postFilter"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">postFilter</span> (line <span class="line-number">245</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Postfilter a value.</p>
<p class="description"><p>Should normalise the value. Should normally be safe to output value after calling this method.  Called AFTER valid() IF validation passes in valid().</p></p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			postFilter
		</span>
					(<span class="var-type">string|int|float|bool</span>&nbsp;<span class="var-name">&$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string|int|float|bool</span>
				<span class="var-name">&$value</span><span class="var-description">: The value to prefilter.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodpreFilter" id="preFilter"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">preFilter</span> (line <span class="line-number">238</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Prefilter a value.</p>
<p class="description"><p>Called before valid()  Should attempt to correct minor user errors if appropiate.</p></p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			preFilter
		</span>
					(<span class="var-type">string|int|float|bool</span>&nbsp;<span class="var-name">&$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string|int|float|bool</span>
				<span class="var-name">&$value</span><span class="var-description">: The value to prefilter.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetOptional" id="setOptional"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">setOptional</span> (line <span class="line-number">273</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets whether this validation rule is optional or not.</p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../../Rho/Rho-valid/Rho_Validator.html#methodoptional">Rho_Validator::optional()</a></li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setOptional
		</span>
					([<span class="var-type">bool</span>&nbsp;<span class="var-name">$optional</span> = <span class="var-default">TRUE</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$optional</span><span class="var-description">: The new optional status - default TRUE.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodvalid" id="valid"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">valid</span> (line <span class="line-number">251</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Determine if a value is valid or not.</p>
	<ul class="tags">
				<li><span class="field">return:</span> TRUE if valid, otherwise an error string.  When testing the return, make sure to use if($validator-&gt;valid($value)===TRUE)</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool|string</span>
		<span class="method-name">
			valid
		</span>
					(<span class="var-type">string|int|float|bool</span>&nbsp;<span class="var-name">&$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string|int|float|bool</span>
				<span class="var-name">&$value</span><span class="var-description">: The value to validate.</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Tue, 13 Oct 2009 19:17:26 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</div></body>
</html>